#ifndef STACK_H
#define STACK_H
#include <iostream>
#include <cstdio>
#include <cstdlib>
#define STACK_INIT_SIZE 100
#define STACKINCREMENT 10
using namespace std;

typedef int SElemType;

struct SqStack {
	SElemType *base;
	SElemType *top;
	int stacksize;
};

bool InitStack(SqStack &S);

bool DestoryStack(SqStack &S);

bool ClearStack(SqStack &S);

bool StackEmpty(SqStack S);

int StackLength(SqStack S);

bool GetTop(SqStack S, SElemType &e);

bool Push(SqStack &S, SElemType e);

bool Pop(SqStack &S, SElemType &e);

#endif
